package com.dubbo.consumer;

import com.dubbo.consumer.proxy.ServicePoxy;
import com.dubbo.provider.service.UserService;

/**
 * @description:
 * @author: 石亚宁
 * @create: 2020-05-28 17:15
 **/

public class ConsumerApplication {
	public static void main(String[] args) {
	/*	HttpClient httpClient=new HttpClient();
		Invocation invocation=new Invocation();
		invocation.setInterfaceName(UserService.class.getName());
		invocation.setMethodName("sayHello");
		invocation.setParameters(new Object[]{"你好"});
		invocation.setParametersTypes(new Class[]{String.class});
		try {
			httpClient.send("http://127.0.0.1",8080,invocation);
		} catch (IOException e) {
			e.printStackTrace();
		}*/
		UserService userService=ServicePoxy.getPoxy(UserService.class);
		String result = userService.sayHello("1111");
		System.out.println(result);
	}
}
